﻿using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using CoreEx.Common.Extensions;
using CoreEx.Database.Client;
using CoreEx.Database.Query;
using CoreEx.DynamicInvoker;
using LinFu.IoC;
using CoreEx.MicroMapper;

namespace CoreEx.Database.Linq.Implementation
{
    public class QueryProvider : QueryProviderBase
    {
        protected override object Execute(Expression expression)
        {
                        
            var translateresult = ExpressionTranslator.Translate(expression);

            Materializer.Materilize(translateresult);

            TranslateResult = translateresult;


            return translateresult.Result;
            
        }
    }
}
